package com.lanzchina.lanclass.controller;


import com.lanzchina.lanclass.service.OpenIdService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class OpenIdController {

    @Autowired
    private OpenIdService openIdService;

    @GetMapping("/getOpenId")
    public String getOpenId(@RequestParam String code) {
        return openIdService.getOpenId(code);
    }
}
